package com.ruoyi.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.inspection.domain.FzInspectionSignIn;
import com.ruoyi.inspection.mapper.FzInspectionSignInMapper;
import com.ruoyi.inspection.service.IFzInspectionSignInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 巡检签到Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-13
 */
@Service
public class FzInspectionSignInServiceImpl implements IFzInspectionSignInService
{
    @Autowired
    private FzInspectionSignInMapper fzInspectionSignInMapper;

    /**
     * 查询巡检签到
     * 
     * @param signInId 巡检签到ID
     * @return 巡检签到
     */
    @Override
    public FzInspectionSignIn selectFzInspectionSignInById(String signInId)
    {
        return fzInspectionSignInMapper.selectFzInspectionSignInById(signInId);
    }

    /**
     * 查询巡检签到列表
     * 
     * @param fzInspectionSignIn 巡检签到
     * @return 巡检签到
     */
    @Override
    public List<FzInspectionSignIn> selectFzInspectionSignInList(FzInspectionSignIn fzInspectionSignIn)
    {
        return fzInspectionSignInMapper.selectFzInspectionSignInList(fzInspectionSignIn);
    }

    /**
     * 新增巡检签到
     * 
     * @param fzInspectionSignIn 巡检签到
     * @return 结果
     */
    @Override
    public int insertFzInspectionSignIn(FzInspectionSignIn fzInspectionSignIn)
    {
        fzInspectionSignIn.setCreateTime(DateUtils.getNowDate());
        return fzInspectionSignInMapper.insertFzInspectionSignIn(fzInspectionSignIn);
    }

    /**
     * 修改巡检签到
     * 
     * @param fzInspectionSignIn 巡检签到
     * @return 结果
     */
    @Override
    public int updateFzInspectionSignIn(FzInspectionSignIn fzInspectionSignIn)
    {
        fzInspectionSignIn.setUpdateTime(DateUtils.getNowDate());
        return fzInspectionSignInMapper.updateFzInspectionSignIn(fzInspectionSignIn);
    }

    /**
     * 删除巡检签到对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionSignInByIds(String ids)
    {
        return fzInspectionSignInMapper.deleteFzInspectionSignInByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除巡检签到信息
     * 
     * @param signInId 巡检签到ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionSignInById(String signInId)
    {
        return fzInspectionSignInMapper.deleteFzInspectionSignInById(signInId);
    }
}
